OpenStack Newton : Configure Neutron#4 ( Network Node )
2017/07/02 |
Configure OpenStack Network Service (Neutron).
This example is not All in One Settings like here, but Configure the 3 Nodes environment like follows.
Neutron needs a plugin software, it's possible to choose it from some softwares. This example chooses ML2 plugin. ( it uses Open vSwitch under the backend ) ------------+---------------------------+---------------------------+------------ | | | eth0|10.0.0.30 eth0|10.0.0.50 eth0|10.0.0.51 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ Control Node ] | | [ Network Node ] | | [ Compute Node ] | | | | | | | | MariaDB RabbitMQ | | Open vSwitch | | Libvirt | | Memcached httpd | | L2,L3,Metadata Agent | | Nova Compute | | Keystone Glance | | | | L2 Agent | | Nova API | | | | | | Neutron Server | | | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Change Kernel parameters for IP fowarding and so on. |
root@network:~# echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf root@network:~# echo 'net.ipv4.conf.default.rp_filter=0' >> /etc/sysctl.conf root@network:~# echo 'net.ipv4.conf.all.rp_filter=0' >> /etc/sysctl.conf root@network:~# sysctl -p |
[2] | Install Neutron services for Network Node. For selection during the installation, select [No] to all or input any value (because create a new conf file later). |
root@network:~# apt -y install neutron-plugin-openvswitch-agent neutron-l3-agent neutron-dhcp-agent neutron-metadata-agent python-neutronclient
|
[3] | Configure as a Network node. |
root@network:~# mv /etc/neutron/neutron.conf /etc/neutron/neutron.conf.org
root@network:~#
vi /etc/neutron/neutron.conf # create new [DEFAULT] core_plugin = ml2 service_plugins = router auth_strategy = keystone state_path = /var/lib/neutron allow_overlapping_ips = True # RabbitMQ connection info transport_url = rabbit://openstack:password@10.0.0.30 [agent] root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf # Keystone auth info [keystone_authtoken] auth_uri = http://10.0.0.30:5000 auth_url = http://10.0.0.30:35357 memcached_servers = 10.0.0.30:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = neutron password = servicepassword [oslo_concurrency] lock_path = $state_path/lock chmod 640 /etc/neutron/neutron.conf root@network:~# chgrp neutron /etc/neutron/neutron.conf
root@network:~#
vi /etc/neutron/l3_agent.ini # line 78: change (set empty now) external_network_bridge =
root@network:~#
vi /etc/neutron/dhcp_agent.ini # line 35: change enable_isolated_metadata = True
root@network:~#
vi /etc/neutron/metadata_agent.ini # line 20: specify Nova API server nova_metadata_ip = 10.0.0.30
# line 30: specify any secret-key you like metadata_proxy_shared_secret = metadata_secret
root@network:~#
vi /etc/neutron/plugins/ml2/ml2_conf.ini # line 90: change type_drivers = flat,vlan,vxlan
# line 94: change (set empty now) tenant_network_types =
root@network:~#
vi /etc/neutron/plugins/ml2/openvswitch_agent.ini # line 99: comment out # tunnel_types = gre
# line 174: add own IP address local_ip = 10.0.0.50 # line 180: comment out # bridge_mappings = external:br-ex
ovs-vsctl add-br br-int root@network:~# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini root@network:~# for service in l3-agent dhcp-agent metadata-agent openvswitch-agent; do
systemctl restart neutron-$service systemctl enable neutron-$service done |